package org.shiwen.week9.friday.q4;

public class Car extends Vehicle implements IPower {
    private String carNumber;

    public Car(String brand, String color, String carNumber) {
        super(brand, color);
        this.carNumber = carNumber;
    }

    public String getCarNumber() {
        return carNumber;
    }

    public void setCarNumber(String carNumber) {
        this.carNumber = carNumber;
    }

    @Override
    public void power() {
        System.out.println("增加动力的方式是加油");
    }

    @Override
    public void run() {
        System.out.println("正在驾驶车牌号为"+carNumber+"的"+getColor()+"的"+getBrand()+"汽车");
    }
}
